{% extends "base.twig" %}

{% block title %}edit{% endblock %}
{% block head %}
    {{ parent() }}

{% endblock %}
{% block content %}


        <div class="header">
            <h1>Page Title</h1>
            <h2>{{msg}}</h2>
        </div>

        <div class="content">            


            <form class="pure-form pure-form-aligned" action="/disease/edit/{{disease.id}}" method="post" enctype="multipart/form-data">
                <fieldset>
                    <div class="pure-control-group">
                        <label for="name">病种</label>
                        <input id="name" name="name" type="text" placeholder="病种" value="{{disease.name}}">
                    </div>

                    <div class="pure-control-group">
                        <label for="treatment">疗法</label>
                        <input id="treatment" type="text" name="treatment" placeholder="疗法" value="{{disease.treatment}}">
                    </div>

                    <div class="pure-control-group">
                        <label for="description">简介</label>
                        <textarea id="description" name="description" value="{{disease.description}}"></textarea>
                    </div>

                    <div class="pure-control-group">
                        <label for="picture">疗法图</label>
                        <input id="picture" name="picture" type="file" >
                        <div class="pure-g">
                            <div class="pure-u-1-2"><p></p></div>
                            <div class="pure-u-1-2"><p>{% if disease.picture %}<img class="pure-img" src="/{{disease.picture}}">{% endif %}</p></div>
                        </div>
                    </div>

                    <div class="pure-controls">
                        <input  name="id" type="hidden" value="{{disease.id}}">
                        <button type="submit" class="pure-button pure-button-primary">添加</button>
                    </div>
                </fieldset>
            </form>


        </div>


        
{% endblock %}